import {
    getOrdersDetail
} from '../../request/api'
import Toast from '@vant/weapp/toast/toast'
Page({
    data: {
        ordersDetail: [],
        activeName: '0'
    },
    onLoad() {
        this.getOrdersDetailData()
    },

    onChange(event) {
        this.setData({
            activeName: event.detail,
        })
    },
    async getOrdersDetailData() {
        const res = await getOrdersDetail()
        if (res.data.code == 200) {
            console.log('订单详情', res);
            this.setData({
                ordersDetail: res.data.data
            })
        } else {
            Toast({
                type: 'fail',
                duration: 3000,
                message: '网络繁忙'
            })
        }

    },
})